﻿using Common;
using Core.CommandHandlers;
using Core.Commands;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Test_Online.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class BaseController : ControllerBase
    {
        public  ICommandBus _CommandBus;
        public CommandHandlerBase _commonHandle;
        

        public BaseController()
        {
            _CommandBus = GetServiceExtension.Services.GetService(typeof(ICommandBus)) as ICommandBus;
            _commonHandle = GetServiceExtension.Services.GetService(typeof(CommandHandlerBase)) as CommandHandlerBase;
        }
        
    }
}
